<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Kyoto Cabinet: kyotocabinet::Thread Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Kyoto Cabinet
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a>      </li>
      <li class="navelem"><a class="el" href="classkyotocabinet_1_1Thread.html">Thread</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">kyotocabinet::Thread Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="kyotocabinet::Thread" -->
<p>Threading device.  
 <a href="classkyotocabinet_1_1Thread.html#details">More...</a></p>

<p><code>#include &lt;kcthread.h&gt;</code></p>

<p><a href="classkyotocabinet_1_1Thread-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#af3131d223a70be7fc2b13b3ca19236e9">Thread</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#af3131d223a70be7fc2b13b3ca19236e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a441ab73a34913c61e28a9f3011a687bb">~Thread</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a441ab73a34913c61e28a9f3011a687bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a1215f3d69811c25d69f1d32d80585402">run</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the concrete process.  <a href="#a1215f3d69811c25d69f1d32d80585402"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a2df1a9de056800ffe0c8512aa9d43a70">start</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the thread.  <a href="#a2df1a9de056800ffe0c8512aa9d43a70"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a1a4f5e8ebcd2201a9078dd20407964d8">join</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the thread to finish.  <a href="#a1a4f5e8ebcd2201a9078dd20407964d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a7676d477e98183da5740c9194988c2f0">detach</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Put the thread in the detached state.  <a href="#a7676d477e98183da5740c9194988c2f0"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a9aba70b9f5075fe2ab121c8c35e141ce">exit</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminate the running thread.  <a href="#a9aba70b9f5075fe2ab121c8c35e141ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#ad457f16aaa83d5dad249533790f28e2c">yield</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Yield the processor from the current thread.  <a href="#ad457f16aaa83d5dad249533790f28e2c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a17a04f40b3432b03b6ffbe123a9a732a">chill</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Chill the processor by suspending execution for a quick moment.  <a href="#a17a04f40b3432b03b6ffbe123a9a732a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a65e09bd823274fcd6f999108b9ffadf0">sleep</a> (double sec)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Suspend execution of the current thread.  <a href="#a65e09bd823274fcd6f999108b9ffadf0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1Thread.html#a32e3671a4355e060cc2bd1b02e3bcf0d">hash</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the hash value of the current thread.  <a href="#a32e3671a4355e060cc2bd1b02e3bcf0d"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Threading device. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af3131d223a70be7fc2b13b3ca19236e9"></a><!-- doxytag: member="kyotocabinet::Thread::Thread" ref="af3131d223a70be7fc2b13b3ca19236e9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classkyotocabinet_1_1Thread.html#af3131d223a70be7fc2b13b3ca19236e9">kyotocabinet::Thread::Thread</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="a441ab73a34913c61e28a9f3011a687bb"></a><!-- doxytag: member="kyotocabinet::Thread::~Thread" ref="a441ab73a34913c61e28a9f3011a687bb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classkyotocabinet_1_1Thread.html#a441ab73a34913c61e28a9f3011a687bb">kyotocabinet::Thread::~Thread</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1215f3d69811c25d69f1d32d80585402"></a><!-- doxytag: member="kyotocabinet::Thread::run" ref="a1215f3d69811c25d69f1d32d80585402" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classkyotocabinet_1_1Thread.html#a1215f3d69811c25d69f1d32d80585402">kyotocabinet::Thread::run</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Perform the concrete process. </p>

</div>
</div>
<a class="anchor" id="a2df1a9de056800ffe0c8512aa9d43a70"></a><!-- doxytag: member="kyotocabinet::Thread::start" ref="a2df1a9de056800ffe0c8512aa9d43a70" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classkyotocabinet_1_1Thread.html#a2df1a9de056800ffe0c8512aa9d43a70">kyotocabinet::Thread::start</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Start the thread. </p>

</div>
</div>
<a class="anchor" id="a1a4f5e8ebcd2201a9078dd20407964d8"></a><!-- doxytag: member="kyotocabinet::Thread::join" ref="a1a4f5e8ebcd2201a9078dd20407964d8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classkyotocabinet_1_1Thread.html#a1a4f5e8ebcd2201a9078dd20407964d8">kyotocabinet::Thread::join</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Wait for the thread to finish. </p>

</div>
</div>
<a class="anchor" id="a7676d477e98183da5740c9194988c2f0"></a><!-- doxytag: member="kyotocabinet::Thread::detach" ref="a7676d477e98183da5740c9194988c2f0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classkyotocabinet_1_1Thread.html#a7676d477e98183da5740c9194988c2f0">kyotocabinet::Thread::detach</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Put the thread in the detached state. </p>

</div>
</div>
<a class="anchor" id="a9aba70b9f5075fe2ab121c8c35e141ce"></a><!-- doxytag: member="kyotocabinet::Thread::exit" ref="a9aba70b9f5075fe2ab121c8c35e141ce" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classkyotocabinet_1_1Thread.html#a9aba70b9f5075fe2ab121c8c35e141ce">kyotocabinet::Thread::exit</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Terminate the running thread. </p>

</div>
</div>
<a class="anchor" id="ad457f16aaa83d5dad249533790f28e2c"></a><!-- doxytag: member="kyotocabinet::Thread::yield" ref="ad457f16aaa83d5dad249533790f28e2c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classkyotocabinet_1_1Thread.html#ad457f16aaa83d5dad249533790f28e2c">kyotocabinet::Thread::yield</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Yield the processor from the current thread. </p>

</div>
</div>
<a class="anchor" id="a17a04f40b3432b03b6ffbe123a9a732a"></a><!-- doxytag: member="kyotocabinet::Thread::chill" ref="a17a04f40b3432b03b6ffbe123a9a732a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classkyotocabinet_1_1Thread.html#a17a04f40b3432b03b6ffbe123a9a732a">kyotocabinet::Thread::chill</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Chill the processor by suspending execution for a quick moment. </p>

</div>
</div>
<a class="anchor" id="a65e09bd823274fcd6f999108b9ffadf0"></a><!-- doxytag: member="kyotocabinet::Thread::sleep" ref="a65e09bd823274fcd6f999108b9ffadf0" args="(double sec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classkyotocabinet_1_1Thread.html#a65e09bd823274fcd6f999108b9ffadf0">kyotocabinet::Thread::sleep</a> </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sec</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Suspend execution of the current thread. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sec</td><td>the interval of the suspension in seconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>

</div>
</div>
<a class="anchor" id="a32e3671a4355e060cc2bd1b02e3bcf0d"></a><!-- doxytag: member="kyotocabinet::Thread::hash" ref="a32e3671a4355e060cc2bd1b02e3bcf0d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int64_t <a class="el" href="classkyotocabinet_1_1Thread.html#a32e3671a4355e060cc2bd1b02e3bcf0d">kyotocabinet::Thread::hash</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the hash value of the current thread. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the hash value of the current thread. </dd></dl>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
